package com.ymttest.database.sqlwapper;

import java.util.List;
import java.util.Map;

import com.ymt.core.tool.Logger;
import com.ymt.database.SqlManager;

/************************************************************************************
 * @File name : YmtProductBrandWapper.java
 * @Author : ligaoge
 * @Date : 2016年8月23日
 * @Copyright : 洋码头
 * 商品品牌
 ************************************************************************************/
public class YmtProductCategoryWapper {
	SqlManager manage;

	public YmtProductCategoryWapper() {
		manage = new SqlManager("intpro");
	}


	//根据品牌ID查询品牌信息
	public List<Map> getProductCategoryByCategoryId (Integer iCategoryId)throws InterruptedException{
		@SuppressWarnings("unchecked")
		List <Map> ProductCategoryList=manage.getSelectResults(
				"com.ymttest.database.mapping.YmtProductCategoryMapper.getProductCategoryByCategoryId", iCategoryId);
    	manage.commit();
		return ProductCategoryList;
	}
	
	//根据品牌ID查询品牌信息
	public List<Map> getAllProductCategory()throws InterruptedException{
		@SuppressWarnings("unchecked")
		List <Map> ProductCategoryList=manage.getSelectResults(
				"com.ymttest.database.mapping.YmtProductCategoryMapper.getAllProductCategory", null);
    	manage.commit();
		return ProductCategoryList;
	}

	public static void main(String args[]) {
	    try {
	    	YmtProductCategoryWapper ymtCatalogsIWapper = new YmtProductCategoryWapper();           
	       System.out.println(ymtCatalogsIWapper.getAllProductCategory().size());
	    } catch (InterruptedException e) {
	        e.printStackTrace();
	    }
	}
	
}
